package com.nwpu.coursesupport.entity;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.nwpu.coursesupport.entity.bean.BaseEntity;
import com.nwpu.coursesupport.enumeration.Gender;
import com.nwpu.coursesupport.enumeration.Status;

public class Assistant extends BaseEntity{
	
	private String assistantCode;
    private String password;
    private String name;
    private Gender gender;
    private String mobilePhone;
    private String email;
    private String qq;
    private String picture;
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date createDate;
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date updateDate;
  
    private Status isFirst;
    
    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getMobilePhone() {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone == null ? null : mobilePhone.trim();
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public String getQq() {
        return qq;
    }

    public void setQq(String qq) {
        this.qq = qq == null ? null : qq.trim();
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture == null ? null : picture.trim();
    }
	public Gender getGender() {
		return gender;
	}
	public void setGender(Gender gender) {
		this.gender = gender;
	}

	public String getAssistantCode() {
		return assistantCode;
	}

	public void setAssistantCode(String assistantCode) {
		this.assistantCode = assistantCode;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public Status getIsFirst() {
		return isFirst;
	}

	public void setIsFirst(Status isFirst) {
		this.isFirst = isFirst;
	}

	@Override
	public boolean equals(Object obj) {
		if(obj instanceof Assistant){
			Assistant ast=(Assistant)obj;
			
			if(ast.getId()==this.getId()){
				return true;
			}
		}
		return false;
	}
}